# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html

from pymongo import MongoClient

client = MongoClient()
collections = client["douban"]["chosen"]

class DbCommentPipeline:
    def process_item(self, item, spider):
        print (item)
        collections.insert(item)
        return item
